import { http } from '@/utils';

// 上传文章
export const publishArticle = (data, isDraft) =>
  http.post(`/mp/articles?draft=${isDraft}`, data);

// 获取文章详情
export const getArticleDetails = id => http.get(`/mp/articles/${id}`);

// 编辑文章
export const editPublishArticle = (data, isDraft) => {
  http.put(`/mp/articles/${data.id}?draft=${isDraft}`, data);
};
